package com.bw.library.mvp.presenter;

import com.bw.library.mvp.model.IModel;
import com.bw.library.mvp.view.IView;

public class BasePresenter<V extends IView,M extends IModel> implements IPresenter {


    protected V mView;
    protected M mModel;

    public BasePresenter(V mView, M mModel) {
        this.mView = mView;
        this.mModel = mModel;
    }

    @Override
    public void destory() {
        if (mModel!=null){
            mModel.destory();
            mModel=null;
        }
        if (mView!=null){
            mView=null;
        }
    }
}
